Booting is a process of loading system software into main memory of a computer. Booting may be triggered by powering on the computer or by a soft restart that does not require power cycling of the computer. The process begins with the execution of boot firmware that performs hardware initialization, e.g., power-on self-test (POST), and is followed by loading and execution of a boot loader.
Typically, boot loaders are pieces of code that run at the boundary between hardware initialization and operating system (OS) kernels, transitioning from one environment to the other. Some boot loaders put the central processing unit (CPU) into the correct mode of operation prior to hand off to the operating system kernel, which includes enabling the memory management unit (MMU) and thus constructing the early kernel address space. Frequently, these boot loaders leverage some assumptions about the platform configuration to make the task simpler. For example, they are loaded at a certain fixed physical memory address (also referred to herein as “machine address”). Often, this address is picked in such a way that the boot loader can be mapped at virtual addresses (VA) equivalent to the machine addresses (MA), in the same address space as all loaded kernel modules and all data structures being constructed for kernel handoff, without conflict. On x86 architectures, these are often low addresses (below 4 GB), as kernel addresses generally have high address bits set.
However, the boot firmware stores the boot loader at unknown virtual addresses within its firmware address space, which is mapped to the machine address space. If machine addresses corresponding to these virtual addresses numerically overlap with virtual addresses needed for handoff to the kernel, memory conflicts would arise in situations where “identity mapping” is employed to map virtual addresses (VA) to machine addresses (MA). Example systems where conflicts might occur include those which (a) do not have memory at low addresses, (b) do not guarantee memory in any specific range, and (c) may have memory at extremely high addresses.